import Cookies from 'js-cookie'
import config from '@/config/index'

export function getToken() {
  return Cookies.get(config.TokenKey)
}

export function setToken(token) {
  console.log('setting token'+token)
  return Cookies.set(config.TokenKey, token,{ expires: 7 })
}

export function removeToken() {
  return Cookies.remove(config.TokenKey)
}
